<!DOCTYPE html>



  


<html class="theme-next mist use-motion" lang="zh-CN">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.3" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.3">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.3">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.3">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.3" color="#222">





  <meta name="keywords" content="Hexo, NexT" />





  <link rel="alternate" href="/atom.xml" title="Likianta Blog" type="application/atom+xml" />






<meta name="description" content="官网上的参数说明不是很详细，尤其是在具体写法上没有合适的参考。 本文将以.\scaffolds\post.md为例，对updated、permalink等参数进行讲解。">
<meta property="og:type" content="article">
<meta property="og:title" content="Hexo\scaffolds\post.md模板中的变量详解">
<meta property="og:url" content="https://likianta.coding.me/2017/1229202646/index.html">
<meta property="og:site_name" content="Likianta Blog">
<meta property="og:description" content="官网上的参数说明不是很详细，尤其是在具体写法上没有合适的参考。 本文将以.\scaffolds\post.md为例，对updated、permalink等参数进行讲解。">
<meta property="og:locale" content="zh-CN">
<meta property="og:image" content="http://ozurciydg.bkt.clouddn.com/17-12-29/9730529.jpg">
<meta property="og:image" content="http://ozurciydg.bkt.clouddn.com/17-12-29/48418721.jpg">
<meta property="og:image" content="http://ozurciydg.bkt.clouddn.com/17-12-29/88066833.jpg">
<meta property="og:updated_time" content="2017-12-31T14:07:21.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Hexo\scaffolds\post.md模板中的变量详解">
<meta name="twitter:description" content="官网上的参数说明不是很详细，尤其是在具体写法上没有合适的参考。 本文将以.\scaffolds\post.md为例，对updated、permalink等参数进行讲解。">
<meta name="twitter:image" content="http://ozurciydg.bkt.clouddn.com/17-12-29/9730529.jpg">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    version: '5.1.3',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://likianta.coding.me/2017/1229202646/"/>





  <title>Hexo\scaffolds\post.md模板中的变量详解 | Likianta Blog</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">Likianta Blog</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tutorials">
          <a href="/tags/tutorial-catalog/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            教程
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://likianta.coding.me/2017/1229202646/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Likianta">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="http://ozurciydg.bkt.clouddn.com/18-2-12/72826549.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Likianta Blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">Hexo\scaffolds\post.md模板中的变量详解</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2017-12-29T20:26:46+08:00">
                2017-12-29
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/hexo/" itemprop="url" rel="index">
                    <span itemprop="name">Hexo</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          
            <div class="post-wordcount">
              
                
                <span class="post-meta-item-icon">
                  <i class="fa fa-file-word-o"></i>
                </span>
                
                  <span class="post-meta-item-text">字数统计&#58;</span>
                
                <span title="字数统计">
                  1,447
                </span>
              

              
                <span class="post-meta-divider">|</span>
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-clock-o"></i>
                </span>
                
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                
                <span title="阅读时长">
                  6
                </span>
              
            </div>
          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <p><a href="https://hexo.io/zh-cn/docs/front-matter.html" target="_blank" rel="noopener">官网</a>上的参数说明不是很详细，尤其是在具体写法上没有合适的参考。</p>
<p>本文将以<code>.\scaffolds\post.md</code>为例，对<code>updated</code>、<code>permalink</code>等参数进行讲解。</p>
<a id="more"></a>
<p>打开<code>.\scaffolds\post.md</code>文件，默认参数如下：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">---</span><br><span class="line">title: &#123;&#123; title &#125;&#125;</span><br><span class="line">date: &#123;&#123; date &#125;&#125;</span><br><span class="line">tags:</span><br><span class="line">---</span><br></pre></td></tr></table></figure>
<p>当我们在命令行中输入：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo new ABC</span><br></pre></td></tr></table></figure>
<p>则会在<code>.\source\_post\</code>目录下产生一个<code>ABC.md</code>文件，内容如下：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">---</span><br><span class="line">title: ABC</span><br><span class="line">date: 2017-12-29 20:20:47</span><br><span class="line">tags:</span><br><span class="line">---</span><br></pre></td></tr></table></figure>
<hr>
<h2 id="1-如何设置permalink？"><a href="#1-如何设置permalink？" class="headerlink" title="1. 如何设置permalink？"></a>1. 如何设置permalink？</h2><p>修改<code>.\scaffolds\post.md</code>，内容为：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">---</span><br><span class="line">title: &#123;&#123; title &#125;&#125;</span><br><span class="line">date: &#123;&#123; date &#125;&#125;</span><br><span class="line">tags:</span><br><span class="line">permalink:</span><br><span class="line">---</span><br></pre></td></tr></table></figure>
<p>让<code>permalink</code>为空，则Hexo会使用默认设置。默认设置是什么呢？就是你的根目录下的<code>_config.yml</code>中定义好的内容：</p>
<p><img src="http://ozurciydg.bkt.clouddn.com/17-12-29/9730529.jpg" alt=""></p>
<p><code>:year</code>表示年份，<code>:month</code>表示月份，<code>:date</code>表示日期。最终的展示效果为<code>https://likianta.coding.me/2017/09/04/title/</code>这种形式。</p>
<p>你也可以把图中的斜杠改为短横线，效果会变成<code>https://likianta.coding.me/2017-09-04/title/</code>。</p>
<p>当然还有其他改法，比如我将默认设置改成了<code>permalink: :year/:category/:title/</code>，其最终的网址就是<code>https://likianta.coding.me/2017/xx分组/xx标题/</code>。</p>
<p>还是以<code>hexo new ABC</code>为例，我们查看<code>ABC.md</code>文件，会发现其内容如下（<code>categories</code>是我设置的分类，不知道怎么创建分类或标签的各位可以参考附录里的链接）：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">---</span><br><span class="line">title: ABC</span><br><span class="line">date: 2017-12-29 20:20:47</span><br><span class="line">categories: uncatalog</span><br><span class="line">tags:</span><br><span class="line">permalink:</span><br><span class="line">---</span><br></pre></td></tr></table></figure>
<p>有些人会疑惑为什么<code>permalink</code>不能像<code>date</code>一样显示为具体的链接呢，具体原因我也不清楚。但并不影响我们<code>server</code>或<code>deploy</code>后的网页效果：</p>
<p><img src="http://ozurciydg.bkt.clouddn.com/17-12-29/48418721.jpg" alt=""></p>
<p>另外需要注意的是，<strong><code>.\scaffolds\post.md</code>中的<code>permalink</code>请一定要留空。</strong></p>
<p>官网中虽然说<code>.\scaffolds\post.md</code>中的<code>permalink</code>内容可以覆盖根目录的默认设置，但实测发现会引起网址bug（这个问题在<a href="https://github.com/hexojs/hexo/issues/1608" target="_blank" rel="noopener">Github</a>中也有相关的讨论）。</p>
<p>比如说你在<code>.\scaffolds\post.md</code>中修改为：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">permalink: :year:month/:title</span><br></pre></td></tr></table></figure>
<p>Hexo会误把它当成一个字符串进行解析，结果就会生成：<code>https://likianta.coding.me/2017/09/04/:year:month/:title/</code>（一个错误的URL路径）。</p>
<p>不过如果我们在具体的文章中手动写上的话是不会报错的：</p>
<p><code>.\source\_post\ABC.md</code>:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">---</span><br><span class="line">title: ABC</span><br><span class="line">date: 2017-12-29 20:20:47</span><br><span class="line">categories: uncatalog</span><br><span class="line">tags:</span><br><span class="line">permalink: https://likianta.coding.me/2017/12/29/ABC/</span><br><span class="line">---</span><br></pre></td></tr></table></figure>
<p>（PS：即便你把这篇文章的网址写错了，比如“2017”错写成“2018”，Hexo在解析时也不会报错。估计这个permalink纯属给自己看的吧。）</p>
<h2 id="2-如何修改date的日期格式使其只显示年月日，不显示时间？"><a href="#2-如何修改date的日期格式使其只显示年月日，不显示时间？" class="headerlink" title="2. 如何修改date的日期格式使其只显示年月日，不显示时间？"></a>2. 如何修改date的日期格式使其只显示年月日，不显示时间？</h2><p>我在网上没有找到修改方法，另外也不建议去修改它。</p>
<p>很多人有这个疑问是担心自己手动创建文章时还要输入一个具体时间会感到很麻烦，事实上这是非强制的选项——即便你只写日期不写时间，也不会影响博客生成正确的创建时间。</p>
<p>不过连日期都不写的话命令行会报错的，所以具体日期请不要省略。</p>
<p>PS：另外也不要在<code>.\scaffolds\post.md</code>或你的具体的文章头使用<code>date: :year-:month-:date</code>来定义，这个方法同样会报错，它和之前的<code>permalink</code>问题一样，会被解析为一个普通字符串，从而将你导向一个无法访问的URL。</p>
<h2 id="3-如何设置updated参数？"><a href="#3-如何设置updated参数？" class="headerlink" title="3. 如何设置updated参数？"></a>3. 如何设置updated参数？</h2><p>在<code>.\scaffolds\post.md</code>中修改为：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">---</span><br><span class="line">title: &#123;&#123; title &#125;&#125;</span><br><span class="line">date: &#123;&#123; date &#125;&#125;</span><br><span class="line">updated: &#123;&#123; date &#125;&#125;</span><br><span class="line">tags:</span><br><span class="line">permalink:</span><br><span class="line">---</span><br></pre></td></tr></table></figure>
<p>具体效果不知道有没有用。因为一般来说文章的创建日期和更新日期是相同的。</p>
<p>有些人可能想到，如果我先在草稿（drafts）中写好，然后半小时后用<code>hexo publish ABC</code>把它转送到<code>_posts</code>文件夹，那么<code>updated</code>会不会变成半小时后的时间呢？</p>
<p>实际测试的结果是Markdown文档中的<code>updated</code>与<code>date</code>相同，都是半小时前的。</p>
<p>看来这个似乎只能通过手动修改啊。</p>
<h2 id="4-我不想让我的网址中出现空格或者中文字符，并且想要使用全英文URL，具体该怎么设置？"><a href="#4-我不想让我的网址中出现空格或者中文字符，并且想要使用全英文URL，具体该怎么设置？" class="headerlink" title="4. 我不想让我的网址中出现空格或者中文字符，并且想要使用全英文URL，具体该怎么设置？"></a>4. 我不想让我的网址中出现空格或者中文字符，并且想要使用全英文URL，具体该怎么设置？</h2><p>首先可以放心的是你的URL路径是不会出现空格的，Hexo会自动把标题、分类等字符中会出现空格的地方用短横线<code>-</code>来代替。</p>
<p>看看你的<code>_posts\</code>目录会发现，凡是文内标题有空格的，其文件名都用短横线来代替了：</p>
<p><img src="http://ozurciydg.bkt.clouddn.com/17-12-29/88066833.jpg" alt=""></p>
<p><strong>Hexo就是根据文件名来作为URL中的<code>:title</code>参数的。</strong></p>
<p>即便你修改了文内标题，只要文件名没变，那么你的网址路径是不会变的。</p>
<p>了解了这点之后，相信你也知道怎么让URL的路径是全英文了：只需把文件名改成英文就可以了。</p>
<p>不过你以为这样就解决了吗？其实这个是最麻烦的方法，还有一个方法可以让这项工作简单百倍。</p>
<h3 id="使用文章id来取代title"><a href="#使用文章id来取代title" class="headerlink" title="使用文章id来取代title"></a>使用文章id来取代title</h3><p>请跳转查看此文章：<a href="https://likianta.coding.me/2017/DocManage/1230205746/">https://likianta.coding.me/2017/DocManage/1230205746/</a></p>
<hr>
<h1 id="附录：一些比较简单的知识补充"><a href="#附录：一些比较简单的知识补充" class="headerlink" title="附录：一些比较简单的知识补充"></a>附录：一些比较简单的知识补充</h1><p>能看到这篇文章的大家应该对开启分类、标签的方法应该都懂得，所以本篇文章没有讲解这些知识。不过放了方便大家回顾这些知识，下面的这些链接会很有帮助：</p>
<p>如何开启分类功能：</p>
<ul>
<li>category - hexo分类与tags配置 - SegmentFault <a href="https://segmentfault.com/q/1010000002561642" target="_blank" rel="noopener">https://segmentfault.com/q/1010000002561642</a></li>
<li>Hexo使用攻略：（四）Hexo的分类和标签设置 | { GoonX } <a href="https://ijiaober.github.io/2014/08/05/hexo/hexo-04/" target="_blank" rel="noopener">https://ijiaober.github.io/2014/08/05/hexo/hexo-04/</a></li>
</ul>
<hr>
<h1 id="相关阅读"><a href="#相关阅读" class="headerlink" title="相关阅读"></a>相关阅读</h1><ul>
<li>Front-matter | Hexo <a href="https://hexo.io/zh-cn/docs/front-matter.html" target="_blank" rel="noopener">https://hexo.io/zh-cn/docs/front-matter.html</a></li>
<li>Post level permalink does not override site config · Issue #1608 · hexojs/hexo <a href="https://github.com/hexojs/hexo/issues/1608" target="_blank" rel="noopener">https://github.com/hexojs/hexo/issues/1608</a></li>
</ul>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      

      
      
        <div class="post-widgets">
        

        

        
          
          <div id="needsharebutton-postbottom">
            <span class="btn">
              <i class="fa fa-share-alt" aria-hidden="true"></i>
            </span>
          </div>
        
        </div>
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2017/1229172454/" rel="next" title="09 Anykey右分页重新设计">
                <i class="fa fa-chevron-left"></i> 09 Anykey右分页重新设计
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/1230-205746/" rel="prev" title="如何让你的Hexo博客网址使用全英文路径">
                如何让你的Hexo博客网址使用全英文路径 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  
    <div class="comments" id="comments">
      <div id="lv-container" data-id="city" data-uid="MTAyMC8zNDI4MS8xMDgxOA=="></div>
    </div>

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="http://ozurciydg.bkt.clouddn.com/18-2-12/72826549.jpg"
                alt="Likianta" />
            
              <p class="site-author-name" itemprop="name">Likianta</p>
              <p class="site-description motion-element" itemprop="description">Android Dev</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/archives/">
              
                  <span class="site-state-item-count">73</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">8</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">2</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          
            <div class="feed-link motion-element">
              <a href="/atom.xml" rel="alternate">
                <i class="fa fa-rss"></i>
                RSS
              </a>
            </div>
          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="http://blog.csdn.net/likianta" target="_blank" title="CSDN">
                      
                        <i class="fa fa-fw fa-crosshairs"></i>CSDN</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="mailto:sheerish@qq.com" target="_blank" title="E-Mail">
                      
                        <i class="fa fa-fw fa-envelope"></i>E-Mail</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://github.com/likianta" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i>GitHub</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="https://weibo.com/5441767757/profile?rightmod=1&wvr=6&mod=personinfo" target="_blank" title="Weibo">
                      
                        <i class="fa fa-fw fa-weibo"></i>Weibo</a>
                  </span>
                
            </div>
          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-如何设置permalink？"><span class="nav-text">1. 如何设置permalink？</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-如何修改date的日期格式使其只显示年月日，不显示时间？"><span class="nav-text">2. 如何修改date的日期格式使其只显示年月日，不显示时间？</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#3-如何设置updated参数？"><span class="nav-text">3. 如何设置updated参数？</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#4-我不想让我的网址中出现空格或者中文字符，并且想要使用全英文URL，具体该怎么设置？"><span class="nav-text">4. 我不想让我的网址中出现空格或者中文字符，并且想要使用全英文URL，具体该怎么设置？</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#使用文章id来取代title"><span class="nav-text">使用文章id来取代title</span></a></li></ol></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#附录：一些比较简单的知识补充"><span class="nav-text">附录：一些比较简单的知识补充</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#相关阅读"><span class="nav-text">相关阅读</span></a></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<div class="copyright">&copy; 2017 &mdash; <span itemprop="copyrightYear">2018</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Likianta</span>

  
</div>


  <div class="powered-by">
    <i class="fa fa-user-md"></i>
    <span id="busuanzi_container_site_pv">
      Site visitors:<span id="busuanzi_value_site_pv"></span>
    </span>
  </div>

<!--
  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Mist</a> v5.1.3</div>

-->



<div class="theme-info">
  <div class="powered-by"></div>
  <span class="post-count">Site words total count:75.2k</span>
</div>
        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.3"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.3"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.3"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.3"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.3"></script>



  


  




	





  





  
    <script type="text/javascript">
      (function(d, s) {
        var j, e = d.getElementsByTagName(s)[0];
        if (typeof LivereTower === 'function') { return; }
        j = d.createElement(s);
        j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
        j.async = true;
        e.parentNode.insertBefore(j, e);
      })(document, 'script');
    </script>
  












  





  

  

  

  
  
  
  <link rel="stylesheet" href="/lib/needsharebutton/needsharebutton.css">

  
  
  <script src="/lib/needsharebutton/needsharebutton.js"></script>

  <script>
    
      pbOptions = {};
      
          pbOptions.iconStyle = "box";
      
          pbOptions.boxForm = "horizontal";
      
          pbOptions.position = "bottomCenter";
      
          pbOptions.networks = "Weibo,Wechat,Douban,QQZone,Evernote";
      
      new needShareButton('#needsharebutton-postbottom', pbOptions);
    
    
  </script>

  

  

  

  

</body>
</html>
